package com.wc.算法基础课.D第四讲数学知识.质数.完全平方数;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/4/4 23:42
 * @description https://www.acwing.com/problem/content/3494/
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long res = 1;
        for (int i = 2; i <= n / i; i++) {
            if (n % i == 0) {
                int t = 0;
                while (n % i == 0) {
                    t++;
                    n /= i;
                }
                if ((t & 1) == 1) res *= i;
            }
        }
        if (n > 1) res *= n;
        System.out.println(res);
    }
}

